package com.hqd.ch03.v20.aop;

import com.hqd.ch03.v20.aopalliance.aop.Advice;

public interface Advised extends TargetClassAware {


    Advisor[] getAdvisors();


    default int getAdvisorCount() {
        return getAdvisors().length;
    }


    void addAdvisor(Advisor advisor);


    void addAdvisor(int pos, Advisor advisor);


    boolean removeAdvisor(Advisor advisor);


    void removeAdvisor(int index);


    int indexOf(Advisor advisor);


    boolean replaceAdvisor(Advisor a, Advisor b);


    void addAdvice(Advice advice);

    void addAdvice(int pos, Advice advice);


    boolean removeAdvice(Advice advice);


    int indexOf(Advice advice);

}
